Use case: Disable and enable write protection ¶
Note
The HAL1 API name for disabling write operations has been renamed to write protection enable in HAL2.
Sequence diagram ¶
Code snippet ¶
|
HAL1 |
HAL2 |
|---|---|
/* Enable write operation */
HAL_SRAM_WriteOperation_Enable(&hsram);
/* Do some write operations if needed */
/* Disable write operation */
HAL_SRAM_WriteOperation_Disable(&hsram);
|
/* Disable the Write protection */
HAL_SRAM_DisableWriteProtection(&hsram);
/* Do some write operations if needed */
/* Enable the Write protection */
HAL_SRAM_EnableWriteProtection(&hsram);
|
Key changes ¶
HAL2 uses explicit write protection APIs (enable/disable write protection).
HAL1 enables/disables write operations using
HAL_SRAM_WriteOperation_Enable()/HAL_SRAM_WriteOperation_Disable().

